# $Id$
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=at-spi2-atk
pkgver=2.24.1
pkgrel=1
pkgdesc="A GTK+ module that bridges ATK to D-Bus at-spi"
arch=('i686' 'x86_64')
url="https://wiki.gnome.org/Accessibility"
license=('GPL2')
depends=('at-spi2-core' 'libx11' 'atk')
makedepends=('git')
_commit=ad3da20b099593520b488e04c11b2eeee2bc39c3  # tags/AT_SPI2_ATK_2_24_1^0
source=("git+https://git.gnome.org/browse/at-spi2-atk#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed -e 's/AT_SPI2_ATK_//' -e 's/_/\./g' -e 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc \
    --disable-schemas-compile
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 et:
